<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd 

">
<%
	String list = (String) request.getAttribute("list");
%>
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>会员注册</title>
<link rel="stylesheet" type="text/css" href="Assets/css/reset.css" />
<script type="text/javascript" src="Assets/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="Assets/js/js_z.js"></script>
<script charset="utf-8" src="<%=basePath%>kindeditor/kindeditor-all.js"></script>
<script charset="utf-8" src="<%=basePath%>kindeditor/lang/zh_CN.js"></script>
<link rel="stylesheet" href="<%=basePath%>kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="<%=basePath%>kindeditor/plugins/code/prettify.css" />
<script charset="utf-8" src="<%=basePath%>kindeditor/plugins/code/prettify.js"></script>
<script type="text/javascript">
	var editor1;
	KindEditor.ready(function(K) {
		editor1 = K.create('textarea[name="content1"]', {
			cssPath : "kindeditor/plugins/code/prettify.css",
			uploadJson : 'kindeditor/jsp/upload_json.jsp',
			fileManagerJson : 'kindeditor/jsp/file_manager_json.jsp',
			allowFileManager : true,
			width:"90%",
			 afterCreate : function() {
				this.loadPlugin('autoheight');
			}, 
			 
			items : [ 'fullscreen', 'source', 'table', 'insertfile', 'link',
					'image', 'emoticons', '|', 'forecolor', 'hilitecolor',
					'bold', 'underline', 'removeformat', '|', 'justifyleft',
					'justifycenter', 'justifyright', 'preview' ]
			
		});
 
	});
</script>
<script type="text/javascript">
 
function fun2(){
	
	var oneuser={UserID:"",Password:"",Password2:"",NickName:"",UserCode:"",BankAddress:"",BankCard:"",BankName:"",img:"",anzhiName:""};
	oneuser.UserID=$("#UserID").val();
	oneuser.Password=$("#Password").val();
	oneuser.Password2=$("#Password2").val();
	oneuser.NickName=$("#NickName").val();
	oneuser.UserCode=$("#UserCode").val();
	oneuser.BankAddress=$("#BankAddress").val();
	oneuser.BankCard=$("#BankCard").val();
	oneuser.BankName=$("#BankName").val();
	oneuser.img=editor1.html();
	oneuser.anzhiName=$("#anzhiName").val();
	for(var i in oneuser){
		if(oneuser[i]==""){
			alert("以上信息不能存在空值");
			return
		}
	}
	if(oneuser.Password!=oneuser.Password2){
		alert("两次输入的密码不一致");
		return ;
	}
 
	var ou = oneuser;
	$.ajax({
		type : 'post',
		url : '${pageContext.request.contextPath}/addUsers.html',
		data : ou,
		success : function(data) {
			if(data=="noid"){
				alert("你的推荐人不存在，请核对后再提交");
			}
			else if(data=="pp"){
				alert("你的注册申请已经提交，无需再次提交");
			}
			else{
				alert("您的注册申请已提交，请等待审核")
				window.close();
			}
		}
	});
}

window.onload=function(){
}
</script>
<link rel="stylesheet" type="text/css" href="Assets/css/thems.css">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
</head>
<body>
	<!--顶部-->
	<div class="h_top">
		<div class="h_top_m">欢迎新用户注册</div>
	</div>
	<!--顶部-->
	<!--头部-->
	<div class="header clearfix">
		<div class="logo">
			<a href=""><img src="Assets/images/logo.png" alt="网" /></a>
		</div>
		<div class="tel">
			<!--img src="Assets/images/tel.png" alt="400-168-0000"-->
		</div>
	</div>

	<div class="space_hx">&nbsp;</div>
	<div class="second">
		<div class="login">
			<div class="box_t">
				<em class="red">会员注册</em>
			</div>
			<dl class="clearfix">
				<dt>
					<img src="Assets/upload/pic4.jpg" alt="" />
				</dt>
				<dd>
					<ul>
					<from name="form1">
						<li>用&nbsp户&nbsp名&nbsp<input class="inp" id="UserID" placeholder="请输入手机号"value="" onKeyUp="value=value.replace(/[^\d]/g,'') "onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"/>(请输入手机号)</li><br>
						<li class="Password">密&nbsp码&nbsp<input type="password" id="Password" name="Password" placeholder="请输入密码" value="" onkeyup="value=value.replace(/\s/g,'')"/></li><br>
						<li>确&nbsp认&nbsp密&nbsp码&nbsp<input type="password" id="Password2" name="Password2" placeholder="请再输入密码" value="" onkeyup="value=value.replace(/\s/g,'')"/>(请保证输入的密码一致) </li><br>
						<!-- <div id="msg" style="color:red;"></div> -->
						<li>姓&nbsp名&nbsp<input class="inp" id="NickName" placeholder="请输入您的真实姓名" value=""></li><br>
						<li>身&nbsp份&nbsp证&nbsp号&nbsp <input class="inp"id="UserCode" placeholder="请输入您的身份证号" value="" onKeyUp="value=value.replace(/[\W]/g,'') "onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"/></li><br>
						<li>地&nbsp址&nbsp<input class="inp"id="BankAddress" placeholder="请输入地址" value=""></li><br>
					    <li>银&nbsp行&nbsp卡&nbsp号&nbsp <input class="inp" id="BankCard" placeholder="请输入您的银行卡号" value="" onKeyUp="value=value.replace(/[^\d]/g,'') "onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"/></li><br>
					    <li>开&nbsp户&nbsp行&nbsp<input class="inp"id="BankName" placeholder="请输入开户行" value="" onkeyup="this.value=this.value.replace(/^ +| +$/g,'')"/></li><br>
					    <li>身&nbsp份&nbsp&nbsp证&nbsp照&nbsp片(正反面)<textarea id="img" name="content1"  rows="4"></textarea></li><br><br><br><br><br><br><br><br><br><br>
						<li>推&nbsp荐&nbsp人&nbsp编&nbsp号&nbsp<input class="inp" id="anzhiName" placeholder="请填写您的推荐人" value=""></li><br>
                        <button type="button" id="save" class="btn btn-primary btn-xs" onclick="fun2()">保存</button>
                        </from>
					</ul>
				</dd>
			</dl>
		</div>
	</div>
	<div class="space_hx">&nbsp;</div>
	<div class="space_hx">&nbsp;</div>
	<div class="f_nav_bg">
		<dl class="f_nav clearfix">
			<dt>
				<img src="Assets/images/tel.png" />
			</dt>
			<dd>
				<div class="tip" style="float: left; width: 200px;">
					<span style="font-size: 16px;">团队</span>
					<li>太原金属企业站</li>
					<li>太原金属商城</li>
					<li>太原金属会员网</li>
				</div>

				<div class="tip" style="float: left; width: 200px;">
					<span style="font-size: 16px;">服务帮助</span>

					<li><a href="news.html?classid=4">为什么选择我们</a></li>

					<li><a href="news.html?classid=3">网站声明</a></li>

					<li><a href="news.html?classid=2">公司公告</a></li>

					<li><a href="news.html?classid=1">行业动态</a></li>

				</div>

				<div class="tip">
					<p>交易大厅</p>
					<p>&nbsp;</p>
				</div>



			</dd>
		</dl>
		<div class="copyriht">版权解释权归太原金属所有</div>
	</div>
</body>
</html>
